<?php
	$userType = $_SESSION['user_type_sess'];
	
	if(isset($_POST['btnAccept'])) {
		if($_SESSION['user_id_sess']!="") {
			$sqlChangeType = "UPDATE tbl_users SET user_type='4' WHERE user_id='".$_SESSION['user_id_sess']."'";
			$rstChangeType = mysql_query($sqlChangeType) or die(mysql_error());
			if(mysql_affected_rows()>0) {
				$_SESSION['user_type_sess'] = 4;
				echo "<script type='text/javascript'> window.location=\"index.php?mySwapen\" </script>";
			}
		}	
	}
?>
<div id='panel'>
<form action="" method="post" name="frmChangeType" id="frmChangeType">
<table width="100%" border="0" class="contentForm"  cellpadding="0" cellspacing="0">
  <tr>
    <td width="35%" class="contentHeader"><h2>
		<?php
		if($userType=='1') { echo "Becoming a Seller"; }
		else if($userType=='2') { echo "Becoming a Buyer"; }
		
		?>
	</h2></td>
  </tr>
  <tr>
    <td style="height:300px;" valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td></td>
			<td  height="10"></td>
		  </tr>
		  <tr>
			<td width="2%"></td>
			<td width="98%"  height="16" >
				<br>
				<div id="messageArea">
				<font face=verdana size=2><b>
				<?php
				
				if($userType=='1') { 
					echo "Congratulations on becoming a seller on Swapen. 
							Before you can make your first sale please agree to the <a href='index.php?faq=seller'>terms and conditions</a>"; 
				}
				else if($userType=='2') { 
					echo "Congratulations on becoming a buyer on Swapen. 
					Before you can make your first purchase please agree to the <a href='index.php?faq=buyer'>terms and conditions</a>"; 
				}
				
				?>
				</b></font>
				</div></td>
		  </tr>
		  <tr>
			<td>&nbsp;</td>
			<td  height="70">&nbsp;</td>
		  </tr>
		  <tr>
			<td>&nbsp;</td>
			<td><input type="submit" name="btnAccept" id="btnAccept" value="Accept" />&nbsp;<input type="button" value="Cancel" onClick="window.location='index.php?mySwapen'"></td>
		  </tr>
		  <tr>
			<td></td>
			<td  height="10"></td>
		  </tr>
		</table>

	</td>
  </tr>
</table>
</form>
</div>